3.9.87 \(\int (a+b x)^2 (A+B x) \, dx\)

Optimal. Leaf size=38 \[ \frac {(a+b x)^3 (A b-a B)}{3 b^2}+\frac {B (a+b x)^4}{4 b^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {43} \begin {gather*} \frac {(a+b x)^3 (A b-a B)}{3 b^2}+\frac {B (a+b x)^4}{4 b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^2*(A + B*x),x]

[Out]

((A*b - a*B)*(a + b*x)^3)/(3*b^2) + (B*(a + b*x)^4)/(4*b^2)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int (a+b x)^2 (A+B x) \, dx &=\int \left (\frac {(A b-a B) (a+b x)^2}{b}+\frac {B (a+b x)^3}{b}\right ) \, dx\\ &=\frac {(A b-a B) (a+b x)^3}{3 b^2}+\frac {B (a+b x)^4}{4 b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 46, normalized size = 1.21 \begin {gather*} \frac {1}{12} x \left (6 a^2 (2 A+B x)+4 a b x (3 A+2 B x)+b^2 x^2 (4 A+3 B x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^2*(A + B*x),x]

[Out]

(x*(6*a^2*(2*A + B*x) + 4*a*b*x*(3*A + 2*B*x) + b^2*x^2*(4*A + 3*B*x)))/12

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int (a+b x)^2 (A+B x) \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x)^2*(A + B*x),x]

[Out]

IntegrateAlgebraic[(a + b*x)^2*(A + B*x), x]

________________________________________________________________________________________

fricas [A]  time = 1.19, size = 49, normalized size = 1.29 \begin {gather*} \frac {1}{4} x^{4} b^{2} B + \frac {2}{3} x^{3} b a B + \frac {1}{3} x^{3} b^{2} A + \frac {1}{2} x^{2} a^{2} B + x^{2} b a A + x a^{2} A \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(B*x+A),x, algorithm="fricas")

[Out]

1/4*x^4*b^2*B + 2/3*x^3*b*a*B + 1/3*x^3*b^2*A + 1/2*x^2*a^2*B + x^2*b*a*A + x*a^2*A

________________________________________________________________________________________

giac [A]  time = 1.15, size = 49, normalized size = 1.29 \begin {gather*} \frac {1}{4} \, B b^{2} x^{4} + \frac {2}{3} \, B a b x^{3} + \frac {1}{3} \, A b^{2} x^{3} + \frac {1}{2} \, B a^{2} x^{2} + A a b x^{2} + A a^{2} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(B*x+A),x, algorithm="giac")

[Out]

1/4*B*b^2*x^4 + 2/3*B*a*b*x^3 + 1/3*A*b^2*x^3 + 1/2*B*a^2*x^2 + A*a*b*x^2 + A*a^2*x

________________________________________________________________________________________

maple [A]  time = 0.00, size = 49, normalized size = 1.29 \begin {gather*} \frac {B \,b^{2} x^{4}}{4}+A \,a^{2} x +\frac {\left (A \,b^{2}+2 B a b \right ) x^{3}}{3}+\frac {\left (2 A a b +B \,a^{2}\right ) x^{2}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2*(B*x+A),x)

[Out]

1/4*B*b^2*x^4+A*a^2*x+1/3*(A*b^2+2*B*a*b)*x^3+1/2*(2*A*a*b+B*a^2)*x^2

________________________________________________________________________________________

maxima [A]  time = 0.69, size = 48, normalized size = 1.26 \begin {gather*} \frac {1}{4} \, B b^{2} x^{4} + A a^{2} x + \frac {1}{3} \, {\left (2 \, B a b + A b^{2}\right )} x^{3} + \frac {1}{2} \, {\left (B a^{2} + 2 \, A a b\right )} x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(B*x+A),x, algorithm="maxima")

[Out]

1/4*B*b^2*x^4 + A*a^2*x + 1/3*(2*B*a*b + A*b^2)*x^3 + 1/2*(B*a^2 + 2*A*a*b)*x^2

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 47, normalized size = 1.24 \begin {gather*} x^2\,\left (\frac {B\,a^2}{2}+A\,b\,a\right )+x^3\,\left (\frac {A\,b^2}{3}+\frac {2\,B\,a\,b}{3}\right )+\frac {B\,b^2\,x^4}{4}+A\,a^2\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)*(a + b*x)^2,x)

[Out]

x^2*((B*a^2)/2 + A*a*b) + x^3*((A*b^2)/3 + (2*B*a*b)/3) + (B*b^2*x^4)/4 + A*a^2*x

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 49, normalized size = 1.29 \begin {gather*} A a^{2} x + \frac {B b^{2} x^{4}}{4} + x^{3} \left (\frac {A b^{2}}{3} + \frac {2 B a b}{3}\right ) + x^{2} \left (A a b + \frac {B a^{2}}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2*(B*x+A),x)

[Out]

A*a**2*x + B*b**2*x**4/4 + x**3*(A*b**2/3 + 2*B*a*b/3) + x**2*(A*a*b + B*a**2/2)

________________________________________________________________________________________